import type { IBignumber } from './bignumber';
import BigNumberUtils from './index';

describe('bignumber', () => {
    let bigNumberUtils: IBignumber;

    beforeEach(() => {
        bigNumberUtils = BigNumberUtils;
    });

    test('add should return the sum of two numbers', () => {
        const num1 = 1;
        const num2 = 2;
        const result = bigNumberUtils.add(num1, num2);
        expect(result).toEqual(3);
    });

    test('subtract should return the difference of two numbers', () => {
        const num1 = 5;
        const num2 = 3;
        const result = bigNumberUtils.subtract(num1, num2);
        expect(result).toEqual(2);
    });

    test('multiply should return the product of two numbers', () => {
        const num1 = 2;
        const num2 = 3;
        const result = bigNumberUtils.multiply(num1, num2);
        expect(result).toEqual(6);
    });

    test('divide should return the quotient of two numbers', () => {
        const num1 = 6;
        const num2 = 2;
        const result = bigNumberUtils.divide(num1, num2);
        expect(result).toEqual(3);
    });
});
